<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: Spec::Rails::Example::HelperExampleGroup</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">Spec::Rails::Example::HelperExampleGroup</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../../../files/__\__\vendor\plugins\rspec_on_rails/lib/spec/rails/example/helper_example_group_rb.html">
                ..\..\vendor\plugins\rspec_on_rails/lib/spec/rails/example/helper_example_group.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                <a href="FunctionalExampleGroup.html">
                FunctionalExampleGroup
               </a>
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <p>
Helper Specs live in $RAILS_ROOT/spec/helpers/.
</p>
<p>
Helper Specs use <a
href="HelperExampleGroup.html">Spec::Rails::Example::HelperExampleGroup</a>,
which allows you to include your Helper directly in the context and write
specs directly against its methods.
</p>
<p>
<a href="HelperExampleGroup.html">HelperExampleGroup</a> also includes the
standard lot of ActionView::Helpers in case your helpers rely on any of
those.
</p>
<h2><a href="../Example.html">Example</a></h2>
<pre>
  class ThingHelper
    def number_of_things
      Thing.count
    end
  end

  describe &quot;ThingHelper example_group&quot; do
    include ThingHelper
    it &quot;should tell you the number of things&quot; do
      Thing.should_receive(:count).and_return(37)
      number_of_things.should == 37
    end
  end
</pre>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000103">eval_erb</a>&nbsp;&nbsp;
      <a href="#M000102">flash</a>&nbsp;&nbsp;
      <a href="#M000101">helper_name</a>&nbsp;&nbsp;
      <a href="#M000104">protect_against_forgery?</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000101" class="method-detail">
        <a name="M000101"></a>

        <div class="method-heading">
          <a href="HelperExampleGroup.src/M000101.html" target="Code" class="method-signature"
            onclick="popupCode('HelperExampleGroup.src/M000101.html');return false;">
          <span class="method-name">helper_name</span><span class="method-args">(name=nil)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
The helper name.&#8230;
</p>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000103" class="method-detail">
        <a name="M000103"></a>

        <div class="method-heading">
          <a href="HelperExampleGroup.src/M000103.html" target="Code" class="method-signature"
            onclick="popupCode('HelperExampleGroup.src/M000103.html');return false;">
          <span class="method-name">eval_erb</span><span class="method-args">(text)</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000102" class="method-detail">
        <a name="M000102"></a>

        <div class="method-heading">
          <a href="HelperExampleGroup.src/M000102.html" target="Code" class="method-signature"
            onclick="popupCode('HelperExampleGroup.src/M000102.html');return false;">
          <span class="method-name">flash</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000104" class="method-detail">
        <a name="M000104"></a>

        <div class="method-heading">
          <a href="HelperExampleGroup.src/M000104.html" target="Code" class="method-signature"
            onclick="popupCode('HelperExampleGroup.src/M000104.html');return false;">
          <span class="method-name">protect_against_forgery?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
TODO: BT - Helper Examples should proxy method_missing to a <a
href="../../Rails.html">Rails</a> View instance. When that is done, remove
this method
</p>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>